from django.db import models
from django.forms import ModelForm
# Create your models here.

class Tasks(models.Model):
    user          = models.CharField(max_length=30)
    title         = models.CharField(max_length=100)
    detail        = models.TextField()
    priority      = models.IntegerField()
    start_date    = models.DateField()
    limit_date    = models.DateField()
    progress      = models.IntegerField()
    complete      = models.BooleanField()
    publish_date  = models.DateField(auto_now_add=True)
    last_mod_date = models.DateField(auto_now=True)

class TasksForm(ModelForm):
    class Meta:
        model = Tasks
        exclude = ('user',)
